package com.xxgc.moriserver.service;

import com.baomidou.mybatisplus.core.toolkit.AES;

public class TestPassword {
    public static void main(String[] args) {
        // 生成16位随机AES密钥
        String randomKey = "1234567890123456";

        String url = "jdbc:mysql://47.109.182.104:3306/ysb";
        String username = "root";
        String password = "aliyun@PASSWORD15730439679";

        // 使用随机密钥加密数据
        String urlEncryptedData = AES.encrypt(url, randomKey);
        String usernameEncryptedData = AES.encrypt(username, randomKey);
        String passwordEncryptedData = AES.encrypt(password, randomKey);

        System.out.println(urlEncryptedData);
        System.out.println(usernameEncryptedData);
        System.out.println(passwordEncryptedData);
    }
}
